/*
 * @Author: Dufen~123 dufen.0
 * @Date: 2024-11-28 13:27:30
 * @LastEditors: Dufen~123 dufen.0
 * @LastEditTime: 2024-11-28 18:27:58
 * @FilePath: \my-project\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

// 引入组件
import App from "../App";
import Teach from "../components/Teach/Teach"
import Login from "../pages/login/login"
import User from "../pages/user/user"
import Goods from "../pages/goods/goods"
import Other from "../pages/other/other"
import Map from "../pages/map/map"


import { createBrowserRouter, Navigate } from "react-router-dom";
 
const router = createBrowserRouter([
  {
    path:'/login',
    element: < Login />,
  },
  {
    path: "/",
    element: < App />,
    children: [
      { path: "", element: <Navigate to="teach" replace /> },
      { path: "teach", element: <Teach />,
        children: [
          { path: "", element: <Navigate to="User" replace /> },
          { path: "Goods", element: <Goods />},
          { path: "User", element: <User />},
          { path: "Map", element: <Map />},
          { path: "Other", element: <Other />},
        
        
        ]
      },
     
    ]
  },
])
 
export default router